package com.atguigu.eduservice.execl;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import io.swagger.annotations.ApiModel;

import javax.xml.crypto.Data;

/**
 * @Auther 赵乾坤
 * @Date 2021-07-01 16:51
 */
@ApiModel("读execl监听")
public class ExcelListener extends AnalysisEventListener<DemoData> {
    @Override
    //读取每一行数据
    public void invoke(DemoData demoData, AnalysisContext analysisContext) {
        System.out.println(demoData);
    }

    //每行数据读取完要做的事:读完写入数据库
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
